﻿using System.Collections.ObjectModel;
using System.IO.Ports;

namespace CarPCBATest.ViewModel
{
    public static class SampleData
    {
        public static ObservableCollection<string> Ports { get; set; } = new ObservableCollection<string>();
        public static ObservableCollection<int> Bauds { get; set; } = new ObservableCollection<int>();
        public static ObservableCollection<int> McuAddress { get; set; } = new ObservableCollection<int>();
        public static ObservableCollection<int> VoltmeterChannels { get; set; } = new ObservableCollection<int>();
        public static ObservableCollection<string> ChipTypes { get; set; }

        public static ObservableCollection<int> StationNos { get; set; } = new ObservableCollection<int>();

        public static ObservableCollection<string> CtlStyles { get; set; }

        static SampleData()
        {
            foreach (var port in SerialPort.GetPortNames())
            {
                Ports.Add(port);
            }
            Bauds = new ObservableCollection<int> { 115200, 128000, 230400, 256000, 460800, 500000 };
            McuAddress = new ObservableCollection<int>() { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
            VoltmeterChannels = new ObservableCollection<int>() { 1, 2, 3 };
            ChipTypes = new ObservableCollection<string>() { "TPS929120", "NSL21912" };
            CtlStyles = new ObservableCollection<string>() { "直流点灯", "通信控制" };
            StationNos = new ObservableCollection<int>() { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
        }
    }
}